package com.itcase.dao;

import com.itcase.domain.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserDao {
    @Select("select * from sys_user")
    List<User> findAllUserInfo();
    @Update("update sys_user set " +
            "username = #{username}, " +
            "email = #{email} " +
            "where id = #{id}")
    void updateUser(User user);
    @Insert("insert into sys_user (username,email) values(#{username},#{email})")

    void userDao(User user);
    @Delete("delete from sys_user where id=#{id}")
    void deleteUser(String id);
    @Select("select * from sys_user where id=#{id}")
    User findUserById(String id);
}
